package com.zm.zmgz.dao;

import com.zm.zmgz.pojo.EmployeeBean;
import com.zm.zmgz.pojo.EmployeeBeanExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeBeanMapper {
    int countByExample(EmployeeBeanExample example);

    int deleteByExample(EmployeeBeanExample example);

    int deleteByPrimaryKey(String identificationnumber);

    int insert(EmployeeBean record);

    int insertSelective(EmployeeBean record);

    List<EmployeeBean> selectByExample(EmployeeBeanExample example);

    EmployeeBean selectByPrimaryKey(String identificationnumber);

    int updateByExampleSelective(@Param("record") EmployeeBean record, @Param("example") EmployeeBeanExample example);

    int updateByExample(@Param("record") EmployeeBean record, @Param("example") EmployeeBeanExample example);

    int updateByPrimaryKeySelective(EmployeeBean record);

    int updateByPrimaryKey(EmployeeBean record);

    List<String> getNames(); // 返回所有的员工名字,不去重

    List<String> getIdentificationNumbers(); // 返回所有的员工的身份证,不去重

    List<String> getReferrers(); // 返回所有的员工的推荐人,去重

    List<EmployeeBean> getEmployees(@Param("searchOption") String searchOption, @Param("searchOptionValue") String searchOptionValue, @Param("limiA") int limiA, @Param("limiB") int limiB); // 根据条件获取员工记录

    int countEmployeesByCondition(@Param("searchOption") String searchOption, @Param("searchOptionValue") String searchOptionValue); // 根据条件获取员工记录数

    List<EmployeeBean> getAvailabledentificationnumbers(); // 注册用户时,获取可用身份证列表
}